import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    //主页路由
    {
        path: "/",
        redirect: "/home"
    },
    {
        path: '/home',
        name: 'Home',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/Home.vue')
    },
    //指南路由
    {
        path: '/DesignPrinciples',
        name: 'DesignPrinciples',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/guide/DesignPrinciples')
    }, {
        path: '/Navigation',
        name: 'Navigation',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/guide/Navigation')
    },


    //组件路由
    {
        path: '/01Install',
        name: '01Install',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/01Install')
    }, {
        path: '/02QuickGetStart',
        name: '02QuickGetStart',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/02QuickGetStart')
    }, {
        path: '/03Internationalization',
        name: '03Internationalization',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/03Internationalization')
    }, {
        path: '/04Theme',
        name: '04Theme',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/04Theme')
    }, {
        path: '/05Animation',
        name: '05Animation',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/05Animation')
    }, {
        path: '/06Layout',
        name: '06Layout',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/06Layout')
    }, {
        path: '/07Container',
        name: '07Container',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/07Container')
    }, {
        path: '/08Color',
        name: '08Color',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/08Color')
    }, {
        path: '/09Typography',
        name: '09Typography',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/09Typography')
    }, {
        path: '/10Border',
        name: '10Border',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/10Border')
    }, {
        path: '/11Table',
        name: '11Table',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/11Table')
    }, {
        path: '/12Tag',
        name: '12Tag',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/component/12Tag')
    },


    //主题路由
    {
        path: '/Theme',
        name: 'Theme',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/theme/Theme')
    },
    //资源路由
    {
        path: '/Resource',
        name: 'Resource',
        meta: {
            scrollToTop: true
        },
        component: () => import('../views/resource/Resource')
    },
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router
